'\" te
.\"  Copyright 1989 AT&T  Copyright (c) 2002, Sun Microsystems, Inc.  All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH NLSGETCALL 3NSL "Nov 14, 2002"
.SH NAME
nlsgetcall \- get client's data passed via the listener
.SH SYNOPSIS
.LP
.nf
#include <sys/tiuser.h>



\fBstruct t_call *\fR\fBnlsgetcall\fR(\fBint\fR \fIfildes\fR);
.fi

.SH DESCRIPTION
.sp
.LP
\fBnlsgetcall()\fR allows server processes started by the listener process to
access the client's \fBt_call\fR structure, that is, the \fIsndcall\fR argument
of \fBt_connect\fR(3NSL).
.sp
.LP
The \fBt_call\fR structure returned by \fBnlsgetcall()\fR can be released using
\fBt_free\fR(3NSL).
.sp
.LP
\fBnlsgetcall()\fR returns the address of an allocated \fBt_call\fR structure
or NULL if a \fBt_call\fR structure cannot be allocated. If the \fBt_alloc()\fR
succeeds, undefined environment variables are indicated by a negative \fIlen\fR
field in the appropriate \fBnetbuf\fR structure.   A \fIlen\fR field of zero in
the \fBnetbuf\fR structure is valid and means that the original buffer in the
listener's \fBt_call\fR structure was NULL.
.SH RETURN VALUES
.sp
.LP
A NULL pointer is returned if a \fBt_call\fR structure cannot be allocated by
\fBt_alloc()\fR. \fBt_errno\fR can be inspected for further error information.
Undefined environment variables are indicated by a negative length field
(\fIlen\fR) in the appropriate \fBnetbuf\fR structure.
.SH FILES
.sp
.ne 2
.na
\fB\fB/usr/lib/libnls.so.1\fR\fR
.ad
.RS 24n
shared object
.RE

.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
MT-Level	Unsafe
.TE

.SH SEE ALSO
.sp
.LP
.BR getenv (3C),
.BR t_alloc (3NSL),
.BR t_connect (3NSL),
.BR t_error (3NSL),
.BR t_free (3NSL),
.BR t_sync (3NSL),
.BR attributes (7),
.BR nlsadmin (8)
.SH WARNINGS
.sp
.LP
The \fIlen\fR field in the \fBnetbuf\fR structure is defined as being unsigned.
In order to check for error returns, it should first be cast to an int.
.sp
.LP
The listener process limits the amount of user data (\fIudata\fR) and options
data (\fIopt\fR) to 128 bytes each.   Address data \fIaddr\fR is limited to 64
bytes. If the original data was longer,  no indication of overflow is given.
.SH NOTES
.sp
.LP
Server processes must call \fBt_sync\fR(3NSL) before calling this routine.
.sp
.LP
This interface is unsafe in multithreaded applications.  Unsafe interfaces
should be called only from the main thread.
